package com.jingdianjichi.subject.common.enums;

import lombok.Getter;

@Getter
public enum CategoryTypeEnums {
    PRIMARY(1,"岗位大类"),
    SECOND(0,"二级分类");

    private int value;
    private String desc;
    CategoryTypeEnums(int code, String desc) {
        this.value = code;
        this.desc = desc;
    }

    public static CategoryTypeEnums getByCode(int codeVal){
        for(CategoryTypeEnums resultCode : CategoryTypeEnums.values()){
            if (resultCode.value == codeVal){
                return resultCode;
            }
        }
        return null;
    }
}
